<template>
  <div class="__item-box" :class="{hideBg: hideBg}">
    <div class="__tit" :style="{'--bg': `url(${bg})`}"><span>{{title}}</span></div>
    <div class="__content" :style="{'--h': height+'px'}">
      <slot></slot>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'itemBox',
    components: {},
    props: {
      title: {
        type: String,
        default: '标题'
      },
      hideBg: {
        type: Boolean,
        default: false
      },
      bg: {
        type: String,
        default: require('@/assets/img/itemtitbg.svg')
      },
      height: {
        type: Number,
        default: 190
      },
    },
    data() {
      return {}
    },
    mounted() {
    },
    methods: {}
  }
</script>

<style scoped lang="scss">
  .__item-box {
    width: 100%;
    background: linear-gradient( 180deg, rgba(73,149,255,0) 0%, rgba(59,106,255,0.14) 100%);
    &.hideBg {
      background: transparent!important;
    }
    .__tit {
      width: 100%; height: 38px; background: var(--bg);
      display: flex; align-items: center;
      span {
        margin-left: 46px;
        font-family: YouSheBiaoTiHei; font-size: 20px; color: #EDF6FF;
      }
    }
    .__content {
      width: 100%; height: var(--h); overflow: hidden;
    }
  }
</style>
